package com.mlody;

import java.awt.Color;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.border.LineBorder;

public class MainWindow extends JFrame {
protected static final String MAIN_WINDOW_NAME = "MAIN_WINDOW_NAME";
public static final String STATUS_WINNING = "STATUS_WINNING";
public static final String STATUS_LOST = "STATUS_LOST";
public static String STATUS_BIDDING="STATUS_BIDDING";
private JLabel sniperStatus = createLabel(Main.STATUS_JOINING);

public MainWindow() {
super("Auction Sniper");
setName(MAIN_WINDOW_NAME);

//sniperStatus.setName(Main.STATUS_JOINING);
add(sniperStatus);
pack();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
}
private static JLabel createLabel(String initialText) {
JLabel result = new JLabel(initialText);
result.setName(Main.SNIPER_STATUS_NAME);
result.setBorder(new LineBorder(Color.BLACK));
return result;
}
public void showStatus(String status) {
sniperStatus.setText(status);
}

}
